import java.util.Scanner;

public class Test6 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int count = 0;
        int max = 0;
        int prev = 0;
        int cur = 0;
        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            if(c>=48 && c<= 57){
                count = 0;
                while ( c>=48 && c<= 57 ){
                    count++;
                    i++;
                    if( i == str.length()){
                        break;
                    }
                    c = str.charAt(i);
                }
                if(count > max){
                    max = count;
                    prev = i-max;
                }
            }
        }
        for (int i = prev; i <max+prev ; i++) {
            System.out.print(str.charAt(i));
        }
    }
}
